#define _CRT_SECURE_NO_WARNINGS
char* longestPalindrome(char* s)
{
    int len = 0;
    char* tmp = s;
    while (*tmp)
    {
        tmp++;
        len++;
    }
    if (len = 0)return 0;
    else if (len = 1)return *s;
    else
    {
        int i = 0;
        int count = 0;
        int length = 0;
        char* loc = NULL;
        for (i = 0; i < len; i++)
        {
            if (s[i] == s[i + 1])
            {
                char* left = i;
                char* right = i + 1;
                while (left >= s && right <= s + len - 1 && *left == *right)
                {
                    count++;
                    left--;
                    right++;
                }
                if (count > length)
                {
                    length = 2 * count;
                    loc = left + 1;
                    count = 0;
                }
            }
            else if (i >= 1 && s[i - 1] == s[i + 1])
            {
                char* left0 = i - 1;
                char* right0 = i + 1;
                while (left0 >= s && right0 <= s + len - 1 && *left0 == *right0)
                {
                    count++;
                    left0--;
                    right0++;
                }
                if (count > length)
                {
                    length = 2 * count + 1;
                    loc = left0 + 1;
                    count = 0;
                }
            }

        }
        if ()

    }

}